package cn.laixueit.api;

import cn.laixueit.cart.pojo.item.SpecGroup;
import cn.laixueit.cart.pojo.item.SpecParams;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;

public interface SpecApi {

    @GetMapping("/spec/params")
    public ResponseEntity<Collection<SpecParams>> groups(@RequestParam(value = "gid",required = false) Long gid,
                                                         @RequestParam(value = "cid",required = false)Long cid,
                                                         @RequestParam(value = "searching",required = false)Boolean searching,
                                                         @RequestParam(value = "generic",required = false)Boolean generic);

    @GetMapping("/spec/groups/{cid}")
    public ResponseEntity<Collection<SpecGroup>> groups(@PathVariable("cid")Long cid);
}
